package cn.zhentao.controller;

import cn.zhentao.pojo.Role;
import cn.zhentao.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("role")
public class RoleController {

    @Autowired
    private RoleService service;

    @RequestMapping("findAll")
    public Result findAll(){
        List<Role> list = service.findAll();
        return new Result(Result.GET_OK,list,null);
    }
}
